interface FruitCreationStrategy {
    Fruit createFruit();
}

// 具体策略实现
class AppleStrategy implements FruitCreationStrategy {
    @Override
    public Fruit createFruit() {
        return new Apple();
    }
}

class BananaStrategy implements FruitCreationStrategy {
    @Override
    public Fruit createFruit() {
        return new Banana();
    }
}